import { defineConfig } from 'vite'
import uni from '@dcloudio/vite-plugin-uni'
import path from 'path'
// https://vitejs.dev/config/
export default defineConfig({
  plugins: [
    uni(),
  ],
  resolve: {
    alias: {
      "@": path.resolve(__dirname, 'src'),  //@路径别名
      "components": path.resolve(__dirname, "./src/components"),
    },
    extensions: ['.js', '.ts', '.jsx', '.tsx', '.json', '.vue', '.mjs'] //自动导入文件 如: 页面中导入@/api 会自动查找@/api/index.vue||index.js
  },
})
